Proponents of an emerging video codec, H.264, are predicting that the scheme will enable the delivery of Internet Protocol-based broadcast-quality video at data rates of less than 1 Mbit/second. Although demand for H.264 may not hit volume before 2004, the codec is gaining rapid recognition by the broadcasting industry and has gone way far enough that MPEG-4, long pitched as the logical interactive enhancement to MPEG-2, could be lost in the shuffle. H.264 proponents also comment that the codec's ability to reduce bandwidth by 50 percent or more has the potential to permit phone companies to deliver broadcast-quality video without revamping their infrastructure. H.264 could enable cable and satellite operators to offer more channels, while letting consumers store twice as many programs in personal video recorders or to record high-definition movies on DVD recorders.
Typically, a H.264 16×16 macroblock consists of four types of macroblocks of one size 110 and four subtypes of macroblock of another size 120 as shown in FIG. 1. The four subtype blocks 120 are part of a P8×8 type macroblock 107. The four macroblock type sizes 110 include a 16×16 type macroblock 101, a 16×8 type macroblock 103, a 8×16 type macroblock and a P8×8 type macroblock 107. The four subtypes include a 8×8 subtype 109, a 8×4 subtype 111, a 4×8 subtype 113 and a 4×4 subtype 115.
Conventionally, motion estimation is performed for every block, regardless of the size. Encoding of each block follows motion estimation. The best size of the block is determined by finding the block size that gives the best rate-distortion performance as shown in FIG. 2.
As seen In FIG. 2, a fast motion estimation for each of 16×16, 16×8 and 8×16 macroblock type (101, 103, 105) are performed at step 201. At step 203, the different sizes are encoded and the results of the best rate distortion are stored. At step 205, the fast motion estimation is performed for each of the four (8×8, 8×4, 4×8, 4×4) subtype macroblocks (109, 111, 113, 115). At step 207, the different 8×8 subtype macroblocks are encoded and the results of the best rate distortion are stored. At step 209, the mode that gives the best rate distortion is chosen from the stored results from the three 16×16, 16×8, 8×16 macroblocks (101, 103, 105) and the four subtypes (109, 111, 113, 115).
It is evident that inter-mode determination can be an extremely time consuming process given that twenty-one motion estimations have to be performed to find the motion vector for each variable-sized block. Furthermore, only the motion vectors belonging to the best size blocks are used and the rest of the motion vectors are discarded at the end, resulting in a waste of computational resources.
The present invention, in at least preferred embodiments, seeks to provide a fast encoding technique to meet this demand and to satisfy the industry's need.